/**
 * Symbol的内置属性
 * Symbol.hasInstance:执行intanceof时触发
 * Symbol.isConcatSpreadable:是否展开，执行concat时触发
 */

class Person {
  static [Symbol.hasInstance](params) {
    console.log(params);
    console.log("我用来检测类型了");
    return false;
  }
}

const p = {
  name: "p"
};
// console.log(p instanceof Person);

const arr = [1, 2, 3];
const arr2 = [4, 5, 6];
arr2[Symbol.isConcatSpreadable] = true;
console.log(arr.concat(arr2));
